import request from '@/utils/request'


export function getInfo(params) {
  return request({
    url: 'getStaffInfo',
    method: 'get',
    params
  })
}


export function treeList(params) {
  return request({
    url: '/dept/list',
    method: 'get',
    params
  })
}

export function getList(params) {
  return request({
    url: '/dept/dept-drop-list',
    method: 'get',
    params
  })
}

export function getDeptListByphone(phoneNumber) {
  return request({
    url: '/user/user-dept-workAddress-jobOffice/'+phoneNumber,
    method: 'get',
  })
}

export function getTempList(params) {
  return request({
    url: '/dept/user-temp-dept-list',
    method: 'get',
    params
  })
}

export function getTempListForAll(params) {
  return request({
    url: '/dept/all-user-temp-dept-list',
    method: 'get',
    params
  })
}

export function add(data) {
  return request({
    url: '/dept/add',
    method: 'post',
    data
  })
}

export function edit(data) {
  return request({
    url: '/dept/edit',
    method: 'put',
    data
  })
}

export function del(data) {
  return request({
    url: '/dept/remove/'+data,
    method: 'delete',
    data
  })
}

export function addTempDept(data) {
  return request({
    url: '/dept/add-temp-dept',
    method: 'post',
    data
  })
}
